package com.sale.goods.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sale.common.mybatis.core.mapper.BaseMapperPlus;
import com.sale.goods.api.dto.ImparityGoodsDto;
import com.sale.goods.api.vo.GetDataByCodeGoodsVo;
import com.sale.goods.domain.GoodsCancel;
import com.sale.goods.domain.GoodsIncome;
import com.sale.goods.domain.dto.GoodsIncomeDto;
import com.sale.goods.domain.dto.ReceiptAndPaymentDocDto;
import com.sale.goods.domain.vo.GoodsIncomeVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description 其他收入单
 * @Date 23-08-07
 * @Author hl
 **/
public interface GoodsIncomeMapper extends BaseMapperPlus<GoodsIncomeMapper, GoodsIncome, GoodsIncome> {

    /**
     * 分页查询其他收入单
     * @param build,buildQueryWrapper
     * @return   List<GoodsIncomeDto>
     */
    Page<GoodsIncomeDto> selectIncomeList(@Param("page") Page<GoodsIncomeVo> build,@Param(Constants.WRAPPER) Wrapper<GoodsIncomeVo> buildQueryWrapper);


    /**
     * 获取其他收入单 (弹框)
     */
    Page<ReceiptAndPaymentDocDto> selectIncomePopList(@Param("page") Page<GoodsIncomeVo> build,@Param(Constants.WRAPPER) Wrapper<GoodsIncomeVo> buildQueryWrapper);

    /**
     * 财务-核销单 通过获取未全部核销的其他收入单数据
     */
    List<ImparityGoodsDto> getNoVerificationListList(@Param("getDataByCodeVo") GetDataByCodeGoodsVo getDataByCodeVo);

    /**
     * 结账反结账（财务模块单据查询）
     */
    List<GoodsIncomeDto> getQClosingDocument(String time);

    /**
     * 结账反结账（财务模块单据查询）
     */
    List<GoodsIncomeDto> getRClosingDocument(String time);

    /**
     * 更新核销金额
     */
    boolean updateInvoicedCancel(GoodsCancel goodsCancel);
}
